<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<form:form id="emplForm" commandName="emplDataCommandFormat">
        <form:hidden path="id" value="${id}"/>
        <form:hidden id="cp_validation_error" path="validationError"/>
        <input type="hidden" id="isDischarged" value="${discharged}">
        <input type="hidden" id="selectedOffice" value="${officeId}">
        <table class="table">
            <tr>
                <td>Имя: </td>
                <td><form:input path="name" value = "${name}"/> </td>
                <td><form:errors path="name"/> </td>
            </tr>
            <tr>
                <td>Фамилия: </td>
                <td><form:input path="surname" value = "${surname}"/> </td>
                <td><form:errors path="surname"/> </td>
            </tr>
            <tr>
                <td>Отчество: </td>
                <td><form:input path="patronymic" value = "${patronymic}"/> </td>
                <td><form:errors path="patronymic"/> </td>
            </tr>
            <tr>
                <td>Должность: </td>
                <td><form:input path="position" value = "${position}"/> </td>
                <td><form:errors path="position"/> </td>
            </tr>
            <tr>
                <td>Skype: </td>
                <td><form:input path="skype" value = "${skype}"/> </td>
                <td><form:errors path="skype"/> </td>
            </tr>
            <tr>
                <td>Рабочий телефон: </td>
                <td><form:input path="phone" value = "${phone}"/> </td>
                <td><form:errors path="phone"/> </td>
            </tr>
            <tr>
                <td>Офис: </td>
                <td>
                    <form:select path="officeId">
                        <form:option value="NONE" label="Выберите офис"/>
                        <form:options items="${officeNameList}" itemValue="id" itemLabel="name"/>
                    </form:select>
                </td>
                <td><form:errors path="officeId"/> </td>
            </tr>
            <tr>
                <td>Уволен: </td>
                <td><form:checkbox path="discharged" disabled="true"/></td>
                <td><form:errors path="discharged"/> </td>
            </tr>
            <tr>
                <td colspan="3">
                    <input class="place-right" type="button" value="Применить Изменения"  onclick="submitEmployeeData();">
                </td>
            </tr>
        </table>
    </form:form>

